Skip to content

Conversation

@jnsdls
Copy link
Member

@jnsdls jnsdls commented Feb 24, 2025

closes: CORE-751

TL;DR

Migrated analytics API endpoints from v1 to v2, replacing client/account IDs with team/project IDs.

What changed?

  • Removed legacy AnalyticsQueryParamsV2 type and consolidated into AnalyticsQueryParams
  • Updated analytics endpoints from v1 to v2 paths
  • Enhanced isProjectActive to return granular status for different services
  • Modified analytics data fetching to use team/project IDs instead of client/account IDs
  • Updated analytics components and pages to use the new parameter structure

How to test?

  1. Navigate to the team analytics page and verify data loads correctly
  2. Check project overview page and confirm analytics are displayed
  3. Verify transaction charts and wallet statistics are functioning
  4. Confirm active status indicators show correct service states

Why make this change?

This change standardizes the analytics API interface by moving away from legacy identifiers (client/account IDs) to the new team/project ID structure, providing more consistent and maintainable analytics data access across the dashboard.


PR-Codex overview

This PR focuses on refactoring the analytics code to replace clientId and accountId with teamId and projectId across various components and APIs, enhancing the organization and clarity of the analytics data handling.

Detailed summary

  • Deleted unused files: in-app.ts, fetch-analytics.ts, and ecosystem.ts.
  • Updated InAppWalletAnalytics and InAppWalletsHeader to use teamId and projectId.
  • Modified AnalyticsQueryParams interface to remove clientId and accountId.
  • Changed TransactionsCharts and related functions to accept AnalyticsQueryParams.
  • Updated API functions to use teamId and projectId instead of clientId.
  • Refactored isProjectActive to return detailed active status.
  • Added getEcosystemWalletUsage function for fetching ecosystem wallet stats.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@vercel
Copy link

vercel bot commented Feb 24, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 25, 2025 3:17am
4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Skipped (Inspect) Feb 25, 2025 3:17am
login ⬜️ Skipped (Inspect) Feb 25, 2025 3:17am
thirdweb_playground ⬜️ Skipped (Inspect) Feb 25, 2025 3:17am
wallet-ui ⬜️ Skipped (Inspect) Feb 25, 2025 3:17am

@vercel vercel bot temporarily deployed to Preview – login February 24, 2025 23:53 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground February 24, 2025 23:53 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui February 24, 2025 23:53 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 February 24, 2025 23:53 Inactive
@changeset-bot
Copy link

changeset-bot bot commented Feb 24, 2025

⚠️ No Changeset found

Latest commit: 35b44f5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions bot added the Dashboard Involves changes to the Dashboard. label Feb 24, 2025
Copy link
Member Author

jnsdls commented Feb 24, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge-queue - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@jnsdls jnsdls marked this pull request as ready for review February 24, 2025 23:56
@jnsdls jnsdls requested review from a team as code owners February 24, 2025 23:56
@linear
Copy link

linear bot commented Feb 24, 2025

@github-actions
Copy link
Contributor

github-actions bot commented Feb 24, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 46.3 KB (0%) 926 ms (0%) 1.8 s (+12.77% 🔺) 2.7 s
thirdweb (cjs) 121.87 KB (0%) 2.5 s (0%) 5.3 s (+18.16% 🔺) 7.7 s
thirdweb (minimal + tree-shaking) 5.6 KB (0%) 112 ms (0%) 218 ms (-29.18% 🔽) 330 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 177 ms (+218% 🔺) 187 ms
thirdweb/react (minimal + tree-shaking) 19.31 KB (0%) 387 ms (0%) 479 ms (+5.27% 🔺) 865 ms

@jnsdls jnsdls force-pushed the migrate_analytics_params_from_clientId/accountId_to_teamId/projectId branch from 634098b to 6cfefc1 Compare February 25, 2025 02:54
@vercel vercel bot temporarily deployed to Preview – login February 25, 2025 02:54 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 February 25, 2025 02:54 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui February 25, 2025 02:54 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground February 25, 2025 02:54 Inactive
@jnsdls jnsdls force-pushed the migrate_analytics_params_from_clientId/accountId_to_teamId/projectId branch from 6cfefc1 to 38f9dbd Compare February 25, 2025 03:04
@vercel vercel bot temporarily deployed to Preview – login February 25, 2025 03:04 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 February 25, 2025 03:04 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground February 25, 2025 03:04 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui February 25, 2025 03:04 Inactive
@jnsdls jnsdls force-pushed the migrate_analytics_params_from_clientId/accountId_to_teamId/projectId branch from 38f9dbd to 35b44f5 Compare February 25, 2025 03:05
@vercel vercel bot temporarily deployed to Preview – docs-v2 February 25, 2025 03:05 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui February 25, 2025 03:05 Inactive
@vercel vercel bot temporarily deployed to Preview – login February 25, 2025 03:05 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground February 25, 2025 03:05 Inactive
@jnsdls jnsdls merged commit 5612542 into main Feb 25, 2025
30 of 31 checks passed
@jnsdls jnsdls deleted the migrate_analytics_params_from_clientId/accountId_to_teamId/projectId branch February 25, 2025 03:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Dashboard Involves changes to the Dashboard.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants